package com.example.exceldemo.controller;

import com.example.exceldemo.service.PoiExcelService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description
 * @Author xiaohuang
 * @Date 2024/9/9
 */
@RequestMapping("word")
@Api(tags = "poi导出")
@RestController
public class PoiController {
    @Autowired
    private PoiExcelService execlService;

    @GetMapping("customExp")
    @ApiOperation(value = "自定义模版导出", produces = "application/octet-stream")
    public void downloadTemplate() {
        execlService.customExp();
    }

    @GetMapping("annotationExp")
    @ApiOperation(value = "注解导出", produces = "application/octet-stream")
    public void annotationExp() {
        execlService.annotationExp();
    }

}
